<template>
    <template v-for="menu in menus">
        <el-sub-menu :index="menu.fullpath" v-if="menu.children">
            <template #title>
                <icon-svg name="dot"></icon-svg>
                <span>{{ menu.meta.title }}</span>
            </template>
            <side-menu :menus="menu.children"></side-menu>
        </el-sub-menu>
        <el-menu-item v-else :index="menu.fullpath">
            <template #title>
                <span>{{ menu.meta.title }}</span>
            </template>
        </el-menu-item>
    </template>
</template>
<script setup lang="ts">
import { Router } from '@/service/common/interface';
defineOptions({ name: 'SideMenu' })
const props = defineProps<{
    menus: Router[]
}>()
const { menus } = props
</script>